package com.slliver.boo3mp3d3.controller;


import com.slliver.boo3mp3d3.model.SysUser;
import com.slliver.boo3mp3d3.service.impl.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class SysUserControler {


    @Autowired
    private SysUserService sysUserService;

    // http://localhost:8080/user/getSysUser/1154070496007032854
    @GetMapping("/getSysUser/{userId}")
    public SysUser getSysUser(@PathVariable Long userId) {
        SysUser sysUser = sysUserService.selectByUserId(userId);
        System.out.println(sysUser);
        return sysUser;
    }

}
